<?php
////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.sf.net                                                  //
//                                                                            //
//   This program is distributed in the hope that it will be useful,          //
//   but WITHOUT ANY WARRANTY, without even the implied warranty of           //
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     //
//                                                                            //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////

if(!empty($_POST['nconfig'])) write_ini_file($_POST['nconfig'], CONFIG_PATH . 'rate.ini');

$system->config = parse_ini_file(CONFIG_PATH . 'rate.ini');
$config = &$system->config;

// Interface generation
$frm =new InputForm ('', 'post', __('Submit'));
$frm->addbreak(__('Rating configuration'));
$frm->addrow(__('Allow for articles categories'), $frm->checkbox('nconfig[cat]', '1', '', @$config['cat']));
$frm->addrow(__('Allow for articles'), $frm->checkbox('nconfig[art]', '1', '', @$config['art']));
$frm->addrow(__('Allow for users'), $frm->checkbox('nconfig[usr]', '1', '', @$config['usr']));
$frm->addrow(__('Allow for forum'), $frm->checkbox('nconfig[for]', '1', '', @$config['for']));
$frm->addrow(__('Allow for files categories'), $frm->checkbox('nconfig[filc]', '1', '', @$config['filc']));
$frm->addrow(__('Allow for files'), $frm->checkbox('nconfig[fil]', '1', '', @$config['fil']));
$frm->addrow(__('Allow for gallery'), $frm->checkbox('nconfig[gal]', '1', '', @$config['gal']));

$frm->show();
?>